window.__require = function t(e, n, i) {
function o(c, a) {
if (!n[c]) {
if (!e[c]) {
var r = c.split("/");
r = r[r.length - 1];
if (!e[r]) {
var l = "function" == typeof __require && __require;
if (!a && l) return l(r, !0);
if (s) return s(r, !0);
throw new Error("Cannot find module '" + c + "'");
}
}
var u = n[c] = {
exports: {}
};
e[c][0].call(u.exports, function(t) {
return o(e[c][1][t] || t);
}, u, u.exports, t, e, n, i);
}
return n[c].exports;
}
for (var s = "function" == typeof __require && __require, c = 0; c < i.length; c++) o(i[c]);
return o;
}({
camera_control: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "42fadF5dr9Kq6HuKLKtyAt2", "camera_control");
cc.Class({
extends: cc.Component,
properties: {
cameraList: [ cc.Camera ],
currentCameraId: 0,
label: {
type: cc.Label,
default: null
}
},
changeCamera: function(t, e) {
if ("main" == e) {
(n = this.cameraList[0]).getComponent(cc.Camera).depth = 10;
n.node.active = !0;
this.cameraList[1].node.active = !1;
} else {
this.cameraList[1].node.active || (this.cameraList[1].node.active = !0);
this.label.string = "0" + parseInt(e);
var n;
(n = this.cameraList[0]).getComponent(cc.Camera).depth = -1;
n.node.active = !1;
}
},
onLoad: function() {},
start: function() {},
update: function(t) {}
});
cc._RF.pop();
}, {} ],
control: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "85accaEnoJLzqzY7HhYfxn5", "control");
t("player_control");
cc.Class({
extends: cc.Component,
properties: {
playerList: [ sp.Skeleton ],
menuList: [ cc.Sprite ],
labelList: [ cc.Label ],
gameRunTime: 0,
is_out: !1,
outTime: 0,
postcard: {
type: cc.Sprite,
default: null
}
},
settleInButtom: function(t, e) {
this.playerSetActive(null, parseInt(e));
this.menuList[parseInt(e) - 1].node.getChildByName("settle_in_icon").active = !1;
this.menuList[parseInt(e) - 1].node.getChildByName("move_away_icon").active = !0;
this.labelList[parseInt(e) - 1].node.getComponent(cc.Label).string = "Charlotte";
},
moveAwayButtomOn: function(t, e) {
this.menuList[parseInt(e) - 1].node.getChildByName("settle_in_icon").active = !0;
this.menuList[parseInt(e) - 1].node.getChildByName("move_away_icon").active = !1;
this.playerSetNotActive(null, parseInt(e));
this.labelList[parseInt(e) - 1].node.getComponent(cc.Label).string = "nobody";
},
outing: function(t) {
this.labelList[parseInt(t) - 1].node.getComponent(cc.Label).string = "travel";
this.playerSetNotActive(null, parseInt(t));
this.is_out = !0;
},
getBack: function(t) {
this.labelList[parseInt(t) - 1].node.getComponent(cc.Label).string = "Charlotte";
this.playerSetActive(null, parseInt(t));
this.is_out = !1;
this.postcard.node.active = !0;
},
playerSetActive: function(t, e) {
this.playerList[parseInt(e) - 1].node.active = !0;
},
playerSetNotActive: function(t, e) {
this.playerList[parseInt(e) - 1].node.active = !1;
},
onLoad: function() {
for (var t = 1; t < 5; t++) cc.sys.localStorage.setItem("firstLog" + t, "true");
this.testDate = new Date();
this.startTime = this.testDate.getTime() / 1e3;
this.gameRunTime = 0;
this.diffTime = this.startTime - cc.sys.localStorage.getItem("dateTime");
if (this.diffTime > 60) this.outing(3); else {
10 * Math.random() + 1 <= (this.diffTime + 10) / 10 ? this.outing(3) : this.labelList[2].node.getComponent(cc.Label).string = "Charlotte";
}
},
update: function(t) {
this.gameRunTime += t;
cc.sys.localStorage.setItem("dateTime", this.startTime + this.gameRunTime);
if (this.is_out) {
this.outTime -= t;
this.outTime < 0 && this.getBack(3);
}
}
});
cc._RF.pop();
}, {
player_control: "player_control"
} ],
font: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "6a88dhbbZxO7JDqxqTjpjPn", "font");
cc.Class({
extends: cc.Component,
properties: {
label_id: [ cc.Label ],
label_bay: [ cc.Label ]
},
onLoad: function() {
for (var t = 0; t < 5; t++) this.label_id[t].node.color = new cc.color(100, 100, 100, 100);
for (t = 0; t < 5; t++) this.label_bay[t].node.color = new cc.color(150, 150, 150, 100);
},
start: function() {}
});
cc._RF.pop();
}, {} ],
local: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "459cfRqyWNBra+UqUjnpAPl", "local");
cc.Class({
extends: cc.Component,
properties: {},
onLoad: function() {
null == cc.sys.localStorage.getItem("firstLog") && console.log("第一次登陆l");
},
start: function() {}
});
cc._RF.pop();
}, {} ],
player_control: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "72dafOUyEVCC5YT9BRuXt6m", "player_control");
cc.Class({
extends: cc.Component,
properties: {
isDebug: !0,
spCon: {
type: sp.Skeleton,
default: null
},
walkStatus: 0,
speed1: 50
},
walkLeft: function() {
this.node.scaleX = -.2;
this.spCon.setAnimation(0, "walk", !0);
this.walkStatus = -1;
},
walkRight: function() {
this.node.scaleX = .2;
this.spCon.setAnimation(0, "walk", !0);
this.walkStatus = 1;
},
sleep: function() {
this.spCon.setAnimation(0, "sleep", !1);
this.spCon.addAnimation(0, "asleep", !0);
this.walkStatus = 0;
},
idle: function() {
this.spCon.setAnimation(0, "idle", !0);
this.walkStatus = 0;
},
keyDown: function(t) {
switch (t.keyCode) {
case cc.macro.KEY.a:
this.walkLeft();
break;

case cc.macro.KEY.d:
this.walkRight();
break;

case cc.macro.KEY.w:
this.sleep();
break;

case cc.macro.KEY.q:
this.idle();
}
},
onLoad: function() {
this.isDebug && cc.systemEvent.on(cc.SystemEvent.EventType.KEY_DOWN, this.keyDown, this);
this.spCon = this.node.getComponent(sp.Skeleton);
this.is_active = !1;
this.active_time = 0;
},
update: function(t) {
if (0 != this.walkStatus) {
1 == this.walkStatus && (this.node.x > 537 ? this.idle() : this.node.x += this.speed1 * t);
-1 == this.walkStatus && (this.node.x < 108 ? this.idle() : this.node.x -= this.speed1 * t);
}
if (this.is_active) {
this.active_time -= t;
this.active_time < 0 && (this.is_active = !1);
} else {
this.active_time = 5 * Math.random() + 3;
var e = 4 * Math.random() + 1;
switch (parseInt(e)) {
case 1:
this.walkLeft();
this.is_active = !0;
break;

case 2:
this.walkRight();
this.is_active = !0;
break;

case 3:
this.idle();
this.is_active = !0;
break;

case 4:
this.sleep();
this.is_active = !0;
}
}
}
});
cc._RF.pop();
}, {} ],
postcard: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "4e302HXb8BIZrVn8DWz+hT4", "postcard");
cc.Class({
extends: cc.Component,
properties: {
box: {
type: cc.Sprite,
default: null
},
tag: {
type: cc.Sprite,
default: null
},
postcard: {
type: cc.Sprite,
default: null
}
},
onLoad: function() {},
tagStop: function() {
this.tag.node.active = !1;
this.postcard.node.active = !0;
},
postcardButtonOn: function() {
this.node.active = !1;
},
boxButtonOn: function(t, e) {
this.anim1 = this.tag.node.getComponent(cc.Animation);
this.box.node.active = !1;
this.tag.node.active = !0;
this.anim1.on("stop", function() {
this.tagStop();
}, this);
},
start: function() {}
});
cc._RF.pop();
}, {} ],
room_control: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "f7c5cqq589KP5uz1bAiEEXa", "room_control");
cc.Class({
extends: cc.Component,
properties: {
current_menu: 0,
menu_list: [ cc.Sprite ],
door_active: !1
},
openDoor: function(t, e) {
if (!this.door_active) {
console.log("openDoor is run", e);
this.node.getChildByName("room" + e).getChildByName("big_door").getComponent(cc.Animation).play("open_door");
this.door_active = !0;
}
},
changeMenu: function(t, e) {
if (0 == this.current_menu) {
this.menu_list[parseInt(e) - 1].node.active = !0;
this.current_menu = parseInt(e);
} else {
for (var n = 0; n < this.menu_list.length; n++) this.menu_list[n].node.active = !1;
if (parseInt(e) != this.current_menu) {
this.menu_list[parseInt(e) - 1].node.active = !0;
this.current_menu = parseInt(e);
} else this.current_menu = 0;
}
},
onLoad: function() {
console.log("game is running");
},
start: function() {}
});
cc._RF.pop();
}, {} ],
room: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "4d6ee6EgPBDy61mkZPzIa/k", "room");
cc.Class({
extends: cc.Component,
properties: {
id: 1,
menu_status: !0,
menu: {
type: cc.Sprite,
default: null
}
},
onMenuButtouttnDwon: function(t, e) {
console.log(e);
console.log(this.menu.node.name);
this.menu.node.active = !1;
},
onLoad: function() {
this.menu.active = !1;
},
start: function() {}
});
cc._RF.pop();
}, {} ],
test: [ function(t, e, n) {
"use strict";
cc._RF.push(e, "fc913iTloRHdLsy57R1DKVM", "test");
cc.Class({
extends: cc.Component,
properties: {},
gameend: function() {
cc.Game.node.end();
},
start: function() {}
});
cc._RF.pop();
}, {} ]
}, {}, [ "camera_control", "font", "local", "control", "player_control", "postcard", "room", "room_control", "test" ]);